typedef unsigned char u8, bool, BOOL;
#include "asm/uart_dev.h"
#include "asm/gpio.h"
#include "user_uart.h"
uart_bus_t *my_uart_bus;
void my_uart_init()
{
    struct uart_platform_data_t u_arg = {0};
    u_arg.tx_pin = IO_PORT_DP;
    u_arg.rx_pin = IO_PORT_DM;
    u_arg.rx_cbuf = NULL;
    u_arg.rx_cbuf_size = 256;
    u_arg.frame_length = 100;
    u_arg.rx_timeout = 20;
    u_arg.isr_cbfun = NULL;
    u_arg.baud = 115200;
    u_arg.is_9bit = 0;
    my_uart_bus = uart_dev_open(&u_arg);
}

void uart_send(u8 *buf, u8 len)
{
    my_uart_bus->write(buf, len);
}

void user_uart_test()
{

    u8 test_data[8] = {1, 2, 3, 4, 5, 6, 7, 8};
    uart_send(test_data, 8);
    u8 test_datuua[8] = {9, 8, 7, 6, 5, 4, 3, 2};
    uart_send(test_datuua, 8);
    delay(10000);
}